<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>var 可以绑定为window对象</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>

</head>
<body>
    <h3>hello . this is h3 </h3>

    <div id="app">


    </div>

    <script>

        // 这样申明的变量，在浏览器控制台中能直接通过window.hello访问到 于是说。var对象申明window对象
        // 这样就有问题了。容易无意识的覆盖全局属性
        var hello = "this is demo for var ...";

        // 所以。用let申明变量更可靠些
        let hello2 = "this is hello 2 for let ..";
    </script>
    
</body>
</html>